package BookManager.operation;

import BookManager.Book;
import BookManager.BookDao;

import java.util.List;
import java.util.Scanner;

public class FindOperation implements IOperation {
    @Override
    public void work() {
        BookDao bookDao=new BookDao();
        System.out.println("请输入要查找的书名");
        Scanner scanner=new Scanner(System.in);
        String name=scanner.next();
        List<Book> books=bookDao.findBookName(name);
        for(Book book : books){
            System.out.println(book);
        }
        System.out.println("查找书籍完毕");
    }
}
